package com.iplay.thezen.iterator;

import java.util.Vector;

/**
 * @author dangwu
 * @since 2021/9/16 8:09 下午
 */
public class ConcreteAggregate implements Aggregate{
    private final Vector<Object> vector = new Vector<>();
    @Override
    public void add(Object object) {
        this.vector.add(object);
    }

    @Override
    public void remove(Object object) {
        this.remove(object);
    }

    @Override
    public Iterator iterator() {
        return new ConcreteIterator(this.vector);
    }
}
